package com.ewhale.feitengguest.ui.shop.msg.adapter

import androidx.recyclerview.widget.RecyclerView
import com.ewhale.feitengguest.R
import com.ewhale.feitengguest.databinding.ItemShopMessageBinding
import com.ewhale.feitengguest.dto.ShopMessageDto
import com.hyphenate.util.DateUtils
import com.simga.library.adapter.BindRecycAdapter
import java.util.*

class SMessageAdapter :BindRecycAdapter<ItemShopMessageBinding,ShopMessageDto>(){
    override fun normalViewId(): Int {
        return R.layout.item_shop_message
    }
    override fun onBindViewHolder(mBinding: ItemShopMessageBinding, itemData: ShopMessageDto, holder: RecyclerView.ViewHolder, position: Int) {
        mBinding.itemData = itemData
        mBinding.tvTime.text = DateUtils.getTimestampString(Date(itemData.createTime*1000))
    }
}
